<template>
	<promoter v-if="nodeConfig.type==0" v-model="nodeConfig"></promoter>

	<executor v-if="nodeConfig.type==3" v-model="nodeConfig"></executor>

	<node-wrap v-if="nodeConfig.childNode" v-model="nodeConfig.childNode"></node-wrap>

</template>

<script>
	import promoter from './nodes/promoter'
	import executor from './nodes/executor'

	export default {
		props: {
			modelValue: { type: Object, default: () => {} }
		},
		components: {
			promoter,
			executor
		},
		data() {
			return {
				nodeConfig: {},
			}
		},
		watch:{
			modelValue(val){
				this.nodeConfig = val
			},
			nodeConfig(val){
				this.$emit("update:modelValue", val)
			}
		},
		mounted() {
			this.nodeConfig = this.modelValue
		},
		methods: {

		}
	}
</script>

<style>
</style>
